package za.org.jcicada.katcp;

/**
 * StrategyPeriod.java
 *
 * @author Simon Cross
 * @author Adrianna Pinska
 *
 * Created on October 30, 2008, 16:27
 */

import za.org.jcicada.katcp.ISamplingStrategy;
import za.org.jcicada.katcp.StrategyBase;

/**
 * A strategy that samples at regular time intervals.
 */
public class StrategyPeriod
extends StrategyBase {

    /**
     * Constructs a StrategyPeriod object.
     *
     * @param params  One parameters giving the sampling period in milliseconds.
     */
    public StrategyPeriod(String[] params) {
        super(ISamplingStrategy.Strategy.PERIOD, params);
        if (params.length != 1) {
            throw new IllegalArgumentException("The 'period' sampling strategy takes one parameter.");
        }
    }

}
